package PrintStreamTest;

import java.io.IOException;
import java.io.PrintStream;

/**
 * @author feng
 * @Date 2021/12/27 17:26
 * 打印流:   字节输出
 */
public class PrintStreamS {
    public static void main(String[] args) throws IOException {
        PrintStream printStream = System.out;
        printStream.println("Hello");
        printStream.write("增加了技术".getBytes());
        //修改输出的位置
        System.setOut(new PrintStream("D:\\IO\\6.text"));
        //输出到文本文件
        System.out.printf("Hello!");

    }
}
